home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Programming / amigatalk / intuition / IDCMPFlags.st < prev    next >
Encoding:
Text File  |  2001-02-28  |  2.4 KB  |  61 lines

  1. " ------------------------------------------------------------------- "
  2. " IDCMPFlags Class is a Singleton class that allows the user to       "
  3. " reference IDCMP Flags without having to remember their actual       "
  4. " hexadecimal values.  This Class is instantiated by the Intuition    "
  5. " class.                                                              "
  6. " ------------------------------------------------------------------- "
  7.  
  8. Class IDCMPFlags :Dictionary ! uniqueInstance !
  9. [
  10.    privateNew ! newinstance !
  11.      newinstance <- super new.
  12.  
  13.      ^ newinstance
  14. |
  15.    new
  16.      ^ self privateSetup
  17. |
  18.    privateSetup
  19.      (uniqueInstance isNil)
  20.        ifTrue: [uniqueInstance <- self privateNew.
  21.  
  22.                 self at: #IDCMP_SIZEVERIFY'     put: 1.
  23.                 self at: #IDCMP_NEWSIZE'        put: 2.
  24.                 self at: #IDCMP_REFRESHWINDOW'  put: 4.
  25.                 self at: #IDCMP_MOUSEBUTTONS'   put: 8.
  26.  
  27.                 self at: #IDCMP_MOUSEMOVE'      put: 16r10.
  28.                 self at: #IDCMP_GADGETDOWN'     put: 16r20.
  29.                 self at: #IDCMP_GADGETUP'       put: 16r40.
  30.                 self at: #IDCMP_REQSET'         put: 16r80.
  31.  
  32.                 self at: #IDCMP_MENUPICK'       put: 16r100.
  33.                 self at: #IDCMP_CLOSEWINDOW'    put: 16r200.
  34.                 self at: #IDCMP_RAWKEY'         put: 16r400.
  35.                 self at: #IDCMP_REQVERIFY'      put: 16r800.
  36.  
  37.                 self at: #IDCMP_REQCLEAR'       put: 16r1000.
  38.                 self at: #IDCMP_MENUVERIFY'     put: 16r2000.
  39.                 self at: #IDCMP_NEWPREFS'       put: 16r4000.
  40.                 self at: #IDCMP_DISKINSERTED'   put: 16r8000.
  41.  
  42.                 self at: #IDCMP_DISKREMOVED'    put: 16r10000.
  43.  
  44.                 "16r20000 is for System use only"
  45.   
  46.                 self at: #IDCMP_ACTIVEWINDOW'   put: 16r40000.
  47.                 self at: #IDCMP_INACTIVEWINDOW' put: 16r80000.
  48.  
  49.                 self at: #IDCMP_DELTAMOVE'      put: 16r100000.
  50.                 self at: #IDCMP_VANILLAKEY'     put: 16r200000.
  51.                 self at: #IDCMP_INTUITICKS'     put: 16r400000.
  52.                 self at: #IDCMP_IDCMPUPDATE'    put: 16r800000.
  53.  
  54.                 self at: #IDCMP_MENUHELP'       put: 16r1000000.
  55.                 self at: #IDCMP_CHANGEWINDOW'   put: 16r2000000.
  56.                 self at: #IDCMP_GADGETHELP'     put: 16r4000000.
  57.                ].
  58.                
  59.      ^ self "uniqueInstance??"
  60. ]
  61.